package com.itheima.d1_collection_set;

public class Car /*implements Comparable<Car>*/{
    private String name;
    private int money;

    public Car() {
    }

    public Car(String name, int money) {
        this.name = name;
        this.money = money;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getMoney() {
        return money;
    }

    public void setMoney(int money) {
        this.money = money;
    }

    @Override
    public String toString() {
        return "Car{" +
                "name='" + name + '\'' +
                ", money=" + money +
                '}';
    }

    /*@Override
    public int compareTo(Car o) {
        return o.getMoney()-this.money;
    }*/
}
